/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* 主要内容区域 */
main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
}

/* 表单样式 */
.task-form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.task-form h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: #667eea;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s ease;
}

button:hover {
    background: #5a67d8;
}

/* 任务列表样式 */
.task-list {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.task-list h2 {
    margin-bottom: 20px;
    color: #333;
}

.filter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    background: #e2e8f0;
    color: #4a5568;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.filter-btn.active,
.filter-btn:hover {
    background: #667eea;
    color: white;
}

.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ddd;
    transition: transform 0.2s ease;
}

.task-item:hover {
    transform: translateX(5px);
}

.task-item.priority-high {
    border-left-color: #e53e3e;
}

.task-item.priority-medium {
    border-left-color: #ed8936;
}

.task-item.priority-low {
    border-left-color: #38a169;
}

.task-item.completed {
    opacity: 0.7;
    background: #f0fff4;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #718096;
}

.task-description {
    color: #718096;
    margin-bottom: 15px;
}

.task-actions {
    display: flex;
    gap: 10px;
}

.task-actions button {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-complete {
    background: #38a169;
}

.btn-complete:hover {
    background: #2f855a;
}

.btn-delete {
    background: #e53e3e;
}

.btn-delete:hover {
    background: #c53030;
}

/* 底部样式 */
footer {
    text-align: center;
    padding: 20px;
    background: #2d3748;
    color: white;
    border-radius: 10px;
    margin-top: auto;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #718096;
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 20px;
}